package com.zzq.consumer.service;


import com.zzq.consumer.bean.Student;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author zzq
 * @Date 2020/2/26 18:35
 * @Version 1.0
 */
@Service
@FeignClient(value = "serviceA-provider-dev")
@RequestMapping("/provider/students")
public interface StudentService {
    @PostMapping("/save")
    boolean saveStudent(Student student);
    @DeleteMapping("/remove/{id}")
    boolean deleteStudent(@PathVariable Integer id);
    @PutMapping("/update/{id}")
    boolean updateStudent(Student student);
    @LoadBalanced
    @GetMapping("/get/{id}")
    Student getStudent(@PathVariable Integer id);
    @GetMapping("/list")
    List<Student> findAll();
}
